package com.demo;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * 运行在spring环境中
 * @author shenguangyang
 */
@Mapper(componentModel = "spring")
public interface ConverterInSpringEnv {
    @Mapping(source = "name", target = "username")
    Target2 toTarget2(Source1 source);
}
